1000
|
It is possible to clip the bar's caption to bar, when the time scale is changed

Dim h
With AxG2antt1
.Columns.Add("Task")
With .Chart
.PaneWidth(False) = 48
.FirstVisibleDate = #12/27/2000#
With .Bars.Item("Task")
.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox
.Height = 13
End With
End With
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","This is a bit of text that get's clipped")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 4
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip) = .ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption)
h = .AddItem("Task 2")
.AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","This is a bit of text that is not clipped")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 1
End With
End With
|
999
|
How can I change the color for all bars with the key matching a pattern

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 64
.Debug = True
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"A")
.AddBar(h,"Task",#1/5/2001#,#1/7/2001#,"B1")
.AddBar(h,"Task",#1/8/2001#,#1/17/2001#,"B2")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"B4")
.ItemBar(0,"<B*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
998
|
How can I change the color for all bars in the same item with the key matching a pattern

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 64
.Debug = True
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"A")
.AddBar(h,"Task",#1/5/2001#,#1/7/2001#,"B1")
.AddBar(h,"Task",#1/8/2001#,#1/17/2001#,"B2")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4")
.ItemBar(h,"<B*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
997
|
How can I change the color for all bars in the same item

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(h,"Task",#1/5/2001#,#1/7/2001#,"K2")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4")
.ItemBar(h,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
996
|
How can I write a special number for each date related to a bar

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 32
.LevelCount = 2
End With
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/2/2001#,#1/13/2001#,"1")
End With
With .Chart.Notes
With .Add("N1",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+2"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "4"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,255,0)
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
With .Add("N2",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+3"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "4"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,255,0)
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
With .Add("N3",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+4"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "5"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(0,255,0)
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
With .Add("N4",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+5"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "5"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(0,255,0)
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
With .Add("N5",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+6"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "8"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,0,0)
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
With .Add("Z",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "E"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "4"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = -9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,128,0)
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
End With
End With
.EndUpdate()
End With
|
995
|
How can I assign a note to be always in the center of the bar

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = 0.5
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "note<br>center"
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,255,0)
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
End With
End With
.EndUpdate()
End With
|
994
|
How can I assign a note relative to the start of the bar, and let it be movable

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+1"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "<%d%>"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 9
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,255,0)
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
End With
End With
.EndUpdate()
End With
|
993
|
How can I associate a note relative to the start of the bar

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "S+1"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "<%d%>"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 9
.PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart) = RGB(255,255,0)
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
End With
End With
.EndUpdate()
End With
|
992
|
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = "E-1"
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "<%d%>"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 18
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 9
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
End With
End With
.EndUpdate()
End With
|
991
|
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = 1
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "End"
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
End With
End With
.EndUpdate()
End With
|
990
|
How can I hide a bar without removing it
With AxG2antt1
.BeginUpdate()
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
.LevelCount = 2
End With
.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1")
.AddBar(.AddItem("Item 2"),"Task",#1/6/2001#,#1/14/2001#,"B2")
.AddLink("L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2")
.ItemBar(.FirstVisibleItem,.FirstItemBar(.FirstVisibleItem),EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent) = 100
End With
.EndUpdate()
End With
|
989
|
How can I align the caption in the note

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("N1",AxG2antt1.Items.FirstVisibleItem,"1","")
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "S <b><%dd%></b>"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 48
.PartAlignment(EXG2ANTTLib.NotePartEnum.exNoteStart) = EXG2ANTTLib.AlignmentEnum.LeftAlignment
.PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 17
End With
With .Add("N2",AxG2antt1.Items.FirstVisibleItem,"1","")
.RelativePosition = 1
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "E <b><%dd%></b>"
.PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart) = 48
.PartAlignment(EXG2ANTTLib.NotePartEnum.exNoteStart) = EXG2ANTTLib.AlignmentEnum.RightAlignment
.PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 17
End With
End With
.EndUpdate()
End With
|
988
|
How I can assign a note and let user move the note relative to the bar

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
End With
With .Chart.Notes
With .Add("Note",AxG2antt1.Items.FirstVisibleItem,"1","End")
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "Day<br> <%dd%>"
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
.PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteStart) = 16
.PartTransparency(EXG2ANTTLib.NotePartEnum.exNoteStart) = 30
.PartToolTip(EXG2ANTTLib.NotePartEnum.exNoteStart) = "Click the note and start moving to a new position."
End With
End With
.EndUpdate()
End With
|
987
|
How can I assign a picture as a note associated with a bar

Dim h
With AxG2antt1
.BeginUpdate()
.set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif")
.set_HTMLPicture("pic2","c:\exontrol\images\auction.gif")
.AntiAliasing = True
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
h = .AddItem("Task 2")
.AddBar(h,"Task",#1/7/2001#,#1/11/2001#,"2")
End With
With .Chart.Notes
With .Add("1",AxG2antt1.Items.ItemByIndex(0),"1","<img>pic1</img>")
.PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartBorderSize(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 0
.ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd)
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd) = -64
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd) = True
End With
With .Add("2",AxG2antt1.Items.ItemByIndex(1),"2","<img>pic2</img>")
.PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartBorderSize(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 0
.ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd)
.RelativePosition = 1
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd) = True
.LinkColor = RGB(255,0,0)
.LinkWidth = 2
.LinkStyle = EXG2ANTTLib.LinkStyleEnum.exLinkDot
.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkVisible
End With
End With
.EndUpdate()
End With
|
986
|
How can I assign a picture as a note associated with a bar

Dim h
With AxG2antt1
.BeginUpdate()
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.AntiAliasing = True
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1")
h = .AddItem("Task 2")
.AddBar(h,"Task",#1/7/2001#,#1/11/2001#,"2")
End With
With .Chart.Notes
With .Add("1",AxG2antt1.Items.ItemByIndex(0),"1","<img>1</img>")
.PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartBorderSize(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 0
.ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd)
End With
With .Add("2",AxG2antt1.Items.ItemByIndex(1),"2","<img>2</img>...<img>3</img>")
.PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd) = False
.PartBorderSize(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 0
.ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd)
.RelativePosition = 1
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd) = True
.LinkColor = RGB(255,0,0)
.LinkWidth = 2
.LinkStyle = EXG2ANTTLib.LinkStyleEnum.exLinkDot
End With
End With
.EndUpdate()
End With
|
985
|
How can I put a box assigned to a DATE

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Item 1")
h = .AddItem("Item 2")
End With
With .Chart.Notes
With .Add("D1",AxG2antt1.Items.FirstVisibleItem,AxG2antt1.Chart.FirstVisibleDate,"Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>")
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd) = True
.PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 20
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 20
End With
With .Add("D2",AxG2antt1.Items.NextVisibleItem(AxG2antt1.Items.FirstVisibleItem),#1/7/2001#,"Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>")
.PartVisible(EXG2ANTTLib.NotePartEnum.exNoteStart) = True
.PartText(EXG2ANTTLib.NotePartEnum.exNoteStart) = "<b><%d%></b>"
.PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd) = True
.PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 20
.PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd) = 20
End With
End With
.EndUpdate()
End With
|
984
|
How can I add a note or a box associated with a bar

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"1","Center")
.ItemBar(h,"1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "left"
.ItemBar(h,"1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 16
h = .AddItem("Task 2")
.AddBar(h,"Task",#1/7/2001#,#1/11/2001#,"2","Center")
.ItemBar(h,"2",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "right"
.ItemBar(h,"2",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 18
End With
With .Chart.Notes
.Add("1S",AxG2antt1.Items.FirstVisibleItem,"1","Start")
.Add("1F",AxG2antt1.Items.FirstVisibleItem,"1","End").RelativePosition = 1
End With
.EndUpdate()
End With
|
983
|
Is it possible to define different working hours for every week day

Dim h
With AxG2antt1
.BeginUpdate()
With .Chart
.PaneWidth(False) = 14
.NonworkingDays = 0
.NonworkingHours = 0
.FirstVisibleDate = #1/1/2001#
.LevelCount = 2
With .Level(0)
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.Label = "<%dddd%>"
End With
With .Level(1)
.Label = "<%hh%>"
.Count = 6
End With
.UnitWidth = 16
End With
.Columns.Add("")
With .Items
h = .AddItem(1)
.ItemNonworkingUnits(h,False) = "weekday(value) != 1 or (weekday(value) = 1 and not ( hour(value) >= 9 and hour(value) <= 14 ))"
h = .AddItem(2)
.ItemNonworkingUnits(h,False) = "weekday(value) = 2 and ( hour(value) >= 9 and hour(value) <= 14 )"
h = .AddItem(3)
.ItemNonworkingUnits(h,False) = "weekday(value) = 3"
End With
.EndUpdate()
End With
|
982
|
How can I automatically update the exBarPercent value using a slider control

Dim i
With AxG2antt1
.BeginUpdate()
.Items.AllowCellValueToItemBar = True
With .Chart
.FirstVisibleDate = #1/1/2002#
.PaneWidth(False) = 128
.Bars.Add("Task%Progress").Shortcut = "Percent"
End With
With .Columns.Add("Percent")
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty) = 518
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey) = "P"
End With
With .Items
i = .AddItem(0)
.CellBold(i,0) = True
.CellEditor(i,0).EditType = EXG2ANTTLib.EditTypeEnum.SliderType
.AddBar(i,"Percent",#1/2/2002#,#1/6/2002#,"P")
.ItemBar(i,"P",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption) = True
.CellValue(i,0) = 50
End With
.EndUpdate()
End With
|
981
|
Is there any automatic way to change a property for all bars in the chart
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
.AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K2")
.AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K3")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4")
.ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
980
|
How can I assign an icon to a bar and I get notified when I click it

Dim h
With AxG2antt1
.BeginUpdate()
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/5/2001#,#1/10/2001#,"","Caption")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "<a1><img>1:8</img></a><a1><img>2</img></a>"
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 16
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHOffset) = 5
End With
.EndUpdate()
End With
|
979
|
How can I assign an icon to a bar so I do not break its caption

Dim h
With AxG2antt1
.BeginUpdate()
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/5/2001#,#1/10/2001#,"","Caption")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "<img>1</img>"
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 16
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHOffset) = 5
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVOffset) = 2
End With
.EndUpdate()
End With
|
978
|
How can I assign multiple lables to the same bar

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#1/5/2001#,#1/7/2001#,"","Right")
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
.AddBar(h1,"",#1/5/2001#,#1/5/2001#,"T1","Left")
.ItemBar(h1,"T1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 16
.AddBar(h1,"",#1/5/2001#,#1/7/2001#,"T2","Center")
.GroupBars(h1,"",True,h1,"T1",True)
.GroupBars(h1,"",True,h1,"T1",False)
.GroupBars(h1,"",True,h1,"T2",True)
.GroupBars(h1,"",False,h1,"T2",False)
End With
.EndUpdate()
End With
|
977
|
Is there any way to have more Captions on a bar than one

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#1/5/2001#,#1/7/2001#,"","Right")
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
.AddBar(h1,"",#1/5/2001#,#1/5/2001#,"T1","Left")
.ItemBar(h1,"T1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 16
.GroupBars(h1,"",True,h1,"T1",True)
.GroupBars(h1,"",True,h1,"T1",False)
End With
.EndUpdate()
End With
|
976
|
How can I assign multiple lables to the same bar at once

Dim h
With AxG2antt1
.BeginUpdate()
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.PaneWidth(False) = 96
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"","Center")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "left"
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 16
h = .AddItem("Task 2")
.AddBar(h,"Task",#1/7/2001#,#1/11/2001#,"","Center")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption) = "right"
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign) = 18
End With
.EndUpdate()
End With
|
975
|
How can I limit the duration or length of the bar
Dim h
With AxG2antt1
.BeginUpdate()
.Chart.FirstVisibleDate = #1/1/2001#
.Chart.ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exStartDate) = #1/1/2001#
.Chart.ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exEndDate) = #1/7/2001#
.Chart.PaneWidth(False) = 128
.Columns.Add("Column")
With .Items
h = .AddItem("Item 1")
.AddBar(h,"Task",#1/2/2001#,#1/5/2001#)
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinDuration) = 2
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxDuration) = 5
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "Min=2 / Max=5"
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
End With
.EndUpdate()
End With
|
974
|
I have an EBN file how can I apply different colors to it, so no need to create a new one

Dim h,hC
With AxG2antt1
.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
.SelBackColor = .BackColor
.SelForeColor = .ForeColor
.HasLines = EXG2ANTTLib.HierarchyLineEnum.exNoLine
.Columns.Add("Default")
With .Items
h = .AddItem("Root")
hC = .InsertItem(h,Nothing,"Default")
.ItemBackColor(hC) = &H1000000
.ItemHeight(.InsertItem(h,Nothing,"")) = 6
hC = .InsertItem(h,Nothing,"Light Green")
.ItemBackColor(hC) = &H100ff00
AxG2antt1.Chart.ItemBackColor(hC) = &H100ff00
.ItemHeight(.InsertItem(h,Nothing,"")) = 6
hC = .InsertItem(h,Nothing,"Dark Green")
.ItemBackColor(hC) = &H1007f00
.ItemHeight(.InsertItem(h,Nothing,"")) = 6
hC = .InsertItem(h,Nothing,"Magenta")
.ItemBackColor(hC) = &H1ff7fff
.ItemHeight(.InsertItem(h,Nothing,"")) = 6
hC = .InsertItem(h,Nothing,"Yellow")
.ItemBackColor(hC) = &H17fffff
.ItemHeight(.InsertItem(h,Nothing,"")) = 6
.ExpandItem(h) = True
End With
End With
|
973
|
I need to specify the non-working hours for about 100 days for each item, but the scrolling is very slow. Is there any option to increase the speed

With AxG2antt1
.BeginUpdate()
.AllowChartScrollPage = True
.Columns.Add("Non-Work")
With .Chart
.FirstVisibleDate = #4/4/2009 4:00:00 PM#
.PaneWidth(False) = 52
.LevelCount = 2
.UnitWidth = 16
With .Level(0)
.Label = "<r><%d%>-<%mmm%>"
.Unit = EXG2ANTTLib.UnitEnum.exDay
End With
With .Level(1)
.Label = "<%hh%>"
.Unit = EXG2ANTTLib.UnitEnum.exHour
.Count = 2
End With
End With
With .Items
.AddItem("Default")
.ItemNonworkingUnits(.AddItem("Test"),False) = "date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 12; #4/6/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #4/7/2009# : hour(value) >= 6 and hour(value) <= 12; #4/8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/9/" & _
"2009# : hour(value) >= 6 and hour(value) <= 12; #4/10/2009# : hour(value) >= 6 and hour(value) <= 12; #4/11/2009# : hour(value) " & _
">= 6 and hour(value) <= 12; #4/12/2009# : hour(value) >= 6 and hour(value) <= 12; #4/13/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #4/14/2009# : hour(value) >= 6 and hour(value) <= 12; #4/15/2009# : hour(value) >= 6 and hour(value) <= 12; #4/16/2009# " & _
": hour(value) >= 6 and hour(value) <= 12; #4/17/2009# : hour(value) >= 6 and hour(value) <= 12; #4/18/2009# : hour(value) >= 6 a" & _
"nd hour(value) <= 12; #4/19/2009# : hour(value) >= 6 and hour(value) <= 12; #4/20/2009# : hour(value) >= 6 and hour(value) <= 12" & _
"; #4/21/2009# : hour(value) >= 6 and hour(value) <= 12; #4/22/2009# : hour(value) >= 6 and hour(value) <= 12; #4/23/2009# : hour" & _
"(value) >= 6 and hour(value) <= 12; #4/24/2009# : hour(value) >= 6 and hour(value) <= 12; #4/25/2009# : hour(value) >= 6 and hou" & _
"r(value) <= 12; #4/26/2009# : hour(value) >= 6 and hour(value) <= 12; #4/27/2009# : hour(value) >= 6 and hour(value) <= 12; #4/2" & _
"8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/29/2009# : hour(value) >= 6 and hour(value) <= 12; #4/30/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #5/1/2009# : hour(value) >= 6 and hour(value) <= 12; #5/2/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #5/3/2009# : hour(value) >= 6 and hour(value) <= 12; #5/4/2009# : hour(value) >= 6 and hour(value) <= 12; #5/5/2009# : h" & _
"our(value) >= 6 and hour(value) <= 12; #5/6/2009# : hour(value) >= 6 and hour(value) <= 12; #5/7/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #5/8/2009# : hour(value) >= 6 and hour(value) <= 12; #5/9/2009# : hour(value) >= 6 and hour(value) <= 12; #5/10" & _
"/2009# : hour(value) >= 6 and hour(value) <= 12; #5/11/2009# : hour(value) >= 6 and hour(value) <= 12; #5/13/2009# : hour(value)" & _
" >= 6 and hour(value) <= 12; #5/14/2009# : hour(value) >= 6 and hour(value) <= 12; #5/15/2009# : hour(value) >= 6 and hour(value" & _
") <= 12; #5/16/2009# : hour(value) >= 6 and hour(value) <= 12; #5/17/2009# : hour(value) >= 6 and hour(value) <= 12; #5/18/2009#" & _
" : hour(value) >= 6 and hour(value) <= 12; #5/19/2009# : hour(value) >= 6 and hour(value) <= 12; #5/20/2009# : hour(value) >= 6 " & _
"and hour(value) <= 12; #5/21/2009# : hour(value) >= 6 and hour(value) <= 12; #5/22/2009# : hour(value) >= 6 and hour(value) <= 1" & _
"2; #5/23/2009# : hour(value) >= 6 and hour(value) <= 12; #5/24/2009# : hour(value) >= 6 and hour(value) <= 12; #5/25/2009# : hou" & _
"r(value) >= 6 and hour(value) <= 12; #5/26/2009# : hour(value) >= 6 and hour(value) <= 12; #5/27/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #5/28/2009# : hour(value) >= 6 and hour(value) <= 12; #5/29/2009# : hour(value) >= 6 and hour(value) <= 12; #5/" & _
"30/2009# : hour(value) >= 6 and hour(value) <= 12; #5/31/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #6/2/2009# : hour(value) >= 6 and hour(value) <= 12; #6/3/2009# : hour(value) >= 6 and hour(value)" & _
" <= 12; #6/4/2009# : hour(value) >= 6 and hour(value) <= 12; #6/5/2009# : hour(value) >= 6 and hour(value) <= 12; #6/6/2009# : h" & _
"our(value) >= 6 and hour(value) <= 12; #6/7/2009# : hour(value) >= 6 and hour(value) <= 12; #6/8/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #6/9/2009# : hour(value) >= 6 and hour(value) <= 12; #6/10/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1" & _
"1/2009# : hour(value) >= 6 and hour(value) <= 12; #6/12/2009# : hour(value) >= 6 and hour(value) <= 12; #6/13/2009# : hour(value" & _
") >= 6 and hour(value) <= 12; #6/14/2009# : hour(value) >= 6 and hour(value) <= 12; #6/15/2009# : hour(value) >= 6 and hour(valu" & _
"e) <= 12; #6/16/2009# : hour(value) >= 6 and hour(value) <= 12; #6/17/2009# : hour(value) >= 6 and hour(value) <= 12; #6/18/2009" & _
"# : hour(value) >= 6 and hour(value) <= 12; #6/19/2009# : hour(value) >= 6 and hour(value) <= 12; #6/21/2009# : hour(value) >= 6" & _
" and hour(value) <= 12; #6/22/2009# : hour(value) >= 6 and hour(value) <= 12; #6/23/2009# : hour(value) >= 6 and hour(value) <= " & _
"12; #6/24/2009# : hour(value) >= 6 and hour(value) <= 12; #6/25/2009# : hour(value) >= 6 and hour(value) <= 12; #6/26/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 12; #6/27/2009# : hour(value) >= 6 and hour(value) <= 12; #6/28/2009# : hour(value) >= 6 and h" & _
"our(value) <= 12; #6/29/2009# : hour(value) >= 6 and hour(value) <= 12; #6/30/2009# : hour(value) >= 6 and hour(value) <= 12; #7" & _
"/1/2009# : hour(value) >= 6 and hour(value) <= 12; #7/2/2009# : hour(value) >= 6 and hour(value) <= 12; #7/3/2009# : hour(value)" & _
" >= 6 and hour(value) <= 12; #7/4/2009# : hour(value) >= 6 and hour(value) <= 12; #7/5/2009# : hour(value) >= 6 and hour(value) " & _
"<= 12; #7/6/2009# : hour(value) >= 6 and hour(value) <= 12; #7/7/2009# : hour(value) >= 6 and hour(value) <= 12; #7/8/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 12; #7/9/2009# : hour(value) >= 6 and hour(value) <= 12; #7/10/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 12; #7/11/2009# : hour(value) >= 6 and hour(value) <= 12; #7/12/2009# : hour(value) >= 6 and hour(value) <= 12; #7/" & _
"13/2009# : hour(value) >= 6 and hour(value) <= 12; #7/14/2009# : hour(value) >= 6 and hour(value) <= 12)"
.ItemNonworkingUnits(.AddItem("Test"),False) = "date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/6" & _
"/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/7/2009# : hour(value) >= 6 and hour(value) <" & _
"= 10 or hour(value) in (16,17,20,21); #4/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/9/" & _
"2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/10/2009# : hour(value) >= 6 and hour(value) <" & _
"= 10 or hour(value) in (16,17,20,21); #4/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/1" & _
"2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/13/2009# : hour(value) >= 6 and hour(value)" & _
" <= 10 or hour(value) in (16,17,20,21); #4/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4" & _
"/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/16/2009# : hour(value) >= 6 and hour(valu" & _
"e) <= 10 or hour(value) in (16,17,20,21); #4/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); " & _
"#4/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/19/2009# : hour(value) >= 6 and hour(va" & _
"lue) <= 10 or hour(value) in (16,17,20,21); #4/20/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21)" & _
"; #4/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/22/2009# : hour(value) >= 6 and hour(" & _
"value) <= 10 or hour(value) in (16,17,20,21); #4/23/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,2" & _
"1); #4/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/25/2009# : hour(value) >= 6 and hou" & _
"r(value) <= 10 or hour(value) in (16,17,20,21); #4/26/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20" & _
",21); #4/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/28/2009# : hour(value) >= 6 and h" & _
"our(value) <= 10 or hour(value) in (16,17,20,21); #4/29/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17," & _
"20,21); #4/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/1/2009# : hour(value) >= 6 and " & _
"hour(value) <= 10 or hour(value) in (16,17,20,21); #5/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17," & _
"20,21); #5/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/4/2009# : hour(value) >= 6 and h" & _
"our(value) <= 10 or hour(value) in (16,17,20,21); #5/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2" & _
"0,21); #5/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/7/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 10 or hour(value) in (16,17,20,21); #5/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20" & _
",21); #5/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/10/2009# : hour(value) >= 6 and ho" & _
"ur(value) <= 10 or hour(value) in (16,17,20,21); #5/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2" & _
"0,21); #5/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/14/2009# : hour(value) >= 6 and " & _
"hour(value) <= 10 or hour(value) in (16,17,20,21); #5/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17" & _
",20,21); #5/16/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/17/2009# : hour(value) >= 6 an" & _
"d hour(value) <= 10 or hour(value) in (16,17,20,21); #5/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16," & _
"17,20,21); #5/19/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/20/2009# : hour(value) >= 6 " & _
"and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (1" & _
"6,17,20,21); #5/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/23/2009# : hour(value) >= " & _
"6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in " & _
"(16,17,20,21); #5/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/26/2009# : hour(value) >" & _
"= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i" & _
"n (16,17,20,21); #5/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/29/2009# : hour(value)" & _
" >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)" & _
" in (16,17,20,21); #5/31/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/1/2009# : hour(value" & _
") >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)" & _
" in (16,17,20,21); #6/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/4/2009# : hour(value)" & _
" >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) " & _
"in (16,17,20,21); #6/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/7/2009# : hour(value) " & _
">= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i" & _
"n (16,17,20,21); #6/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/10/2009# : hour(value) " & _
">= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) " & _
"in (16,17,20,21); #6/12/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/13/2009# : hour(value" & _
") >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value" & _
") in (16,17,20,21); #6/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/16/2009# : hour(val" & _
"ue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(val" & _
"ue) in (16,17,20,21); #6/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/19/2009# : hour(v" & _
"alue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(v" & _
"alue) in (16,17,20,21); #6/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/23/2009# : hour" & _
"(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour" & _
"(value) in (16,17,20,21); #6/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/26/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/27/2009# : hour(value) >= 6 and hour(value) <= 10 or ho" & _
"ur(value) in (16,17,20,21); #6/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/29/2009# : " & _
"hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/30/2009# : hour(value) >= 6 and hour(value) <= 10 or " & _
"hour(value) in (16,17,20,21); #7/1/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/2/2009# : " & _
"hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/3/2009# : hour(value) >= 6 and hour(value) <= 10 or h" & _
"our(value) in (16,17,20,21); #7/4/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/5/2009# : h" & _
"our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/6/2009# : hour(value) >= 6 and hour(value) <= 10 or ho" & _
"ur(value) in (16,17,20,21); #7/7/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/8/2009# : ho" & _
"ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hou" & _
"r(value) in (16,17,20,21); #7/10/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/11/2009# : h" & _
"our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/12/2009# : hour(value) >= 6 and hour(value) <= 10 or h" & _
"our(value) in (16,17,20,21); #7/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/14/2009# :" & _
" hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21))"
.AddItem("Default")
End With
.EndUpdate()
End With
|
972
|
How can I use the CASE statement (CASE usage)
With AxG2antt1
.BeginUpdate()
With .Columns.Add("Value")
.Width = 24
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Columns.Add("CASE - statment")
.ComputedField = "%0 case (default:'not found';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourt" & _
"heen')"
.ToolTip = .ComputedField
End With
With .Items
.AddItem(0)
.AddItem(1)
.AddItem(2)
End With
.EndUpdate()
End With
|
971
|
How can I use the CASE statement (CASE usage)
With AxG2antt1
.BeginUpdate()
With .Columns.Add("Value")
.Width = 24
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Columns.Add("CASE - statment")
.ComputedField = "%0 case (default:'not found';1:'One';2:'Two';3:'Three';4:'Four';5:'Five';7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen" & _
"';14:'Fourtheen')"
.ToolTip = .ComputedField
End With
With .Items
.AddItem(0)
.AddItem(1)
.AddItem(2)
End With
.EndUpdate()
End With
|
970
|
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
With AxG2antt1
.BeginUpdate()
With .Columns.Add("Value")
.Width = 24
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Columns.Add("SWITCH - statment")
.ComputedField = "%0 switch ('not found', 1,2,3,4,5,7,8,9,11,13,14)"
.ToolTip = .ComputedField
End With
With .Items
.AddItem(0)
.AddItem(1)
.AddItem(2)
End With
.EndUpdate()
End With
|
969
|
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
With AxG2antt1
.BeginUpdate()
With .Columns.Add("Value")
.Width = 24
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Columns.Add("IN - statment")
.ComputedField = "%0 in (1,2,3,4,5,7,8,9,11,13,14) ? 'found' : ''"
.ToolTip = .ComputedField
End With
With .Items
.AddItem(0)
.AddItem(1)
.AddItem(2)
End With
.EndUpdate()
End With
|
968
|
How can I automatically update the exBarPercent value using a slider control

Dim i
With AxG2antt1
.BeginUpdate()
.Items.AllowCellValueToItemBar = True
With .Chart
.FirstVisibleDate = #1/1/2002#
.PaneWidth(False) = 128
.Bars.Add("Task%Progress").Shortcut = "Percent"
End With
With .Columns.Add("Percent")
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty) = 12
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey) = "P"
End With
With .Items
i = .AddItem(0)
.CellBold(i,0) = True
With .CellEditor(i,0)
.EditType = EXG2ANTTLib.EditTypeEnum.SliderType
.Option(EXG2ANTTLib.EditorOptionEnum.exSliderStep) = 0.01
.Option(EXG2ANTTLib.EditorOptionEnum.exSpinStep) = 0.01
.Option(EXG2ANTTLib.EditorOptionEnum.exSliderMax) = 1
.Option(EXG2ANTTLib.EditorOptionEnum.exSliderWidth) = -100
End With
.CellValueFormat(i,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
.AddBar(i,"Percent",#1/2/2002#,#1/6/2002#,"P")
.ItemBar(i,"P",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption) = True
.CellValue(i,0) = 0.5
End With
.EndUpdate()
End With
|
967
|
How can I automatically update the exBarPercent value using a spin control

Dim i
With AxG2antt1
.BeginUpdate()
.Items.AllowCellValueToItemBar = True
With .Chart
.FirstVisibleDate = #1/1/2002#
.PaneWidth(False) = 128
.Bars.Add("Task%Progress").Shortcut = "Percent"
End With
With .Columns.Add("Percent")
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty) = 12
.FormatColumn = "((0:=round(dbl(%0)*100)) >= 50 ? '<font 8>'+ =:0 + '%</font>' : '<fgcolor=808080><font 6>'+ =:0 + '%</font></fgcolor>')"
End With
With .Items
i = .AddItem(0)
.CellBold(i,0) = True
With .CellEditor(i,0)
.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
.Option(EXG2ANTTLib.EditorOptionEnum.exSpinStep) = 0.01
.Option(EXG2ANTTLib.EditorOptionEnum.exSliderMax) = 1
End With
.CellValueFormat(i,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
.AddBar(i,"Percent",#1/2/2002#,#1/6/2002#)
.CellValue(i,0) = 0.5
End With
.EndUpdate()
End With
|
966
|
How do I specify for an item all units as being non-working units

With AxG2antt1
.BeginUpdate()
.AllowChartScrollPage = True
.Columns.Add("Non-Work")
With .Chart
.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
.FirstVisibleDate = #4/3/2009 10:00:00 AM#
.PaneWidth(False) = 64
.LevelCount = 2
.UnitWidth = 16
With .Level(0)
.Label = "<r><%d%>-<%mmm%>"
.Unit = EXG2ANTTLib.UnitEnum.exDay
End With
With .Level(1)
.Label = "<%hh%>"
.Unit = EXG2ANTTLib.UnitEnum.exHour
.Count = 2
End With
End With
With .Items
.AddItem("Default")
.ItemNonworkingUnits(.AddItem("All-Non-Working"),False) = "1"
.AddItem("Default")
End With
.EndUpdate()
End With
|
965
|
How do I specify for an item all units as being working units

With AxG2antt1
.BeginUpdate()
.AllowChartScrollPage = True
.Columns.Add("Non-Work")
With .Chart
.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
.FirstVisibleDate = #4/3/2009 10:00:00 AM#
.PaneWidth(False) = 64
.LevelCount = 2
.UnitWidth = 16
With .Level(0)
.Label = "<r><%d%>-<%mmm%>"
.Unit = EXG2ANTTLib.UnitEnum.exDay
End With
With .Level(1)
.Label = "<%hh%>"
.Unit = EXG2ANTTLib.UnitEnum.exHour
.Count = 2
End With
End With
With .Items
.AddItem("Default")
.ItemNonworkingUnits(.AddItem("All-Working"),False) = "0"
.AddItem("Default")
End With
.EndUpdate()
End With
|
964
|
How can I programmatically specify different non-working units ( days, hours ) for different items

Dim h
With AxG2antt1
.BeginUpdate()
.AllowChartScrollPage = True
.Columns.Add("Non-Work")
With .Chart
.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
.Bars.Add("Task:Split").Shortcut = "Task"
.FirstVisibleDate = #7/13/2009 0:00:00 PM#
.PaneWidth(False) = 52
.LevelCount = 2
.UnitWidth = 16
With .Level(0)
.Label = "<r><b><%d%></b> <%mmm%> <%yyyy%>"
.Unit = EXG2ANTTLib.UnitEnum.exDay
End With
With .Level(1)
.Label = "<%hh%>"
.Unit = EXG2ANTTLib.UnitEnum.exHour
.Count = 2
End With
End With
With .Items
h = .AddItem("Item 1")
.ItemNonworkingUnits(h,False) = "(shortdate(value) = #7/14/2009# and hour(value) >= 6 and hour(value) <= 12)"
.AddBar(h,"Task",#7/14/2009 4:00:00 AM#,#7/14/2009 2:00:00 PM#)
h = .AddItem("Item 2")
.ItemNonworkingUnits(h,False) = "(((hour(value) >= 4 and hour(value) <= 16) or hour(value) = 2) and month(value) = 7) or ((hour(value) >= 2 and hour(value) < 10" & _
")) and month(value) = 6 or weekday(value) = 6"
.AddBar(h,"Task",#7/14/2009 1:00:00 AM#,#7/14/2009 6:00:00 AM#)
End With
.EndUpdate()
End With
|
963
|
I am programmatically select a date using the Chart.SelectDate property, but can't see why the date is not highlighted. What am I doing wrong
With AxG2antt1
With .Chart
.LevelCount = 2
.FirstVisibleDate = #1/1/2001#
.SelectLevel = 1
.SelectDate(#1/4/2001#) = True
End With
End With
|
962
|
How do I show a shorter line in the chart's level

With AxG2antt1
.BeginUpdate()
.GridLineColor = RGB(128,128,128)
With .Chart
.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
.UnitWidth = 24
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 0
.LevelCount = 2
With .Level(0)
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.Label = "<%dddd%>"
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
With .Level(1)
.Label = 65536
.Count = 6
.DrawTickLines = &H200 Or EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelUpperHalf Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine)
End With
End With
.EndUpdate()
End With
|
961
|
How do I replicate the screen shot http://www.exontrol.com/images/exg2antt9.jpg

Dim h
With AxG2antt1
.BeginUpdate()
With .VisualAppearance
.Add(1,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headdark.ebn")
.Add(2,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\xpbsel.ebn")
.Add(3,"C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headligh.ebn")
.Add(4,"CP:1 0 0 1 1")
End With
.GetOcx().BackColorHeader = &H4000000
.Chart.BackColorLevelHeader = &H4000000
.GetOcx().SelBackColor = &H20000ff
.GridLineColor = RGB(128,128,128)
.HeaderHeight = 22
.SelForeColor = RGB(0,0,0)
.MarkSearchColumn = False
.ScrollBySingleLine = False
.ShowFocusRect = False
.DefaultItemHeight = 48
With .Columns
With .Add("Group")
.Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox) = True
.Def(EXG2ANTTLib.DefColumnEnum.exCellBackColor) = 50331648
.LevelKey = 1
End With
With .Add("Histogram")
.Width = 18
.AllowSizing = False
.LevelKey = 1
.Position = 0
End With
End With
With .Chart
.FirstVisibleDate = #6/11/2009#
.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
.PaneWidth(False) = 96
.LevelCount = 2
.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
With .Level(0)
.Label = "<%mmmm%> <%yyyy%>"
.Unit = EXG2ANTTLib.UnitEnum.exMonth
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
End With
With .Level(1)
.FormatLabel = "weekday(dvalue)=1?value:''"
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine)
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
End With
With .Bars.Item("Task")
.Color = &H2000000
.Height = 18
.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack
.HistogramColor = &H1000000
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
.HistogramVisible = True
.HistogramHeight = 48
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
End With
With .Items
h = .AddItem("Group <b>A</b>")
.CellValueFormat(h,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
.CellMerge(h,0) = 1
.AddBar(h,"Task",#6/12/2009#,#6/19/2009#,"K1","Requirements")
.AddBar(h,"Task",#6/13/2009#,#6/21/2009#,"K2","Sales & Marketing")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
.ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
.CellState(h,0) = 1
h = .AddItem("Group <b>B</b>")
.CellValueFormat(h,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
.CellMerge(h,0) = 1
.AddBar(h,"Task",#6/14/2009#,#6/23/2009#,"K1","<b>GUI</b> Design")
.AddBar(h,"Task",#6/18/2009#,#6/25/2009#,"K2","Class Design")
h = .AddItem("Group <b>C</b>")
.CellValueFormat(h,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
.CellMerge(h,0) = 1
.AddBar(h,"Task",#6/12/2009#,#6/19/2009#,"K1","<b>GUI</b> Coding")
.AddBar(h,"Task",#6/13/2009#,#6/25/2009#,"K2","Design & Concept")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 65280
.ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 65280
End With
.EndUpdate()
End With
|
960
|
How can I remove all bars from the chart
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
.AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2")
.ClearBars(0)
End With
End With
|
959
|
How can I change the color for all bars with a specified key
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
.AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2")
.ItemBar(0,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
958
|
Is there any automatic way to change a property for all bars with a specified key
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
.AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2")
.ItemBar(0,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
End With
End With
|
957
|
How can I remove all bars with specified key
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
.AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/4/2001#,"K1")
.AddBar(.AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K2")
.RemoveBar(0,"K1")
End With
End With
|
956
|
How do I several bars with different vertical offsets

Dim h
With AxG2antt1
.Chart.FirstVisibleDate = #1/1/2001#
.Columns.Add("Column")
With .Items
h = .AddItem("Item")
.ItemHeight(h) = 62
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"T1")
.ItemBar(h,"T1",EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = -23
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"T2")
.ItemBar(h,"T2",EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = -11
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"T3")
.ItemBar(h,"T3",EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = 1
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"T4")
.ItemBar(h,"T4",EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = 13
.AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"T5")
.ItemBar(h,"T5",EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = 25
End With
End With
|
955
|
Is there any option to show gradient bars without using EBN technology

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Chart.Bars.Item("Task")
.Color = RGB(255,0,0)
.StartColor = RGB(0,255,0)
.EndColor = RGB(255,255,0)
.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox
End With
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"")
End With
End With
|
954
|
How can I define a bar with border and solid filling

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Chart.Bars.Item("Task")
.Color = RGB(255,0,0)
.StartColor = RGB(255,255,0)
.EndColor = RGB(255,255,0)
.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox
End With
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"")
End With
End With
|
953
|
How can I define a bar with border and solid filling

Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Chart.Bars.Item("Task")
.Color = RGB(255,0,0)
.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox
.Height = 18
End With
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor) = 65535
End With
End With
|
952
|
How do I define a bar with solid border and filling

Dim h
With AxG2antt1
.VisualAppearance.Add(1,"C:\Program Files\Exontrol\ExG2antt.NET\sample\EBN\blackboxt.ebn")
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Chart.Bars.Item("Task")
.Color = &H1000000
.Height = 18
End With
With .Items
h = .AddItem("Task")
.AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"")
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
.ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor) = 65535
End With
End With
|
951
|
Can I control the units/resource/effort being allocated to a bar when displaying OverAllocation histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Columns.Add("Effort")
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty) = 21
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 96
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 202
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exRectangularCurve Or EXG2ANTTLib.PatternEnum.exPatternDot
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
.HistogramCriticalValue = 50
.HistogramGridLinesColor = RGB(192,192,192)
.HistogramRulerLinesColor = RGB(0,0,1)
End With
End With
With .Items
.AllowCellValueToItemBar = True
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#)
.CellValue(h1,1) = 2
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/24/2005#,#6/28/2005#)
.CellValue(h1,1) = 1
h1 = .AddItem("Task 3")
.AddBar(h1,"Task",#6/27/2005#,#7/1/2005#)
.CellValue(h1,1) = 2
h1 = .AddItem("Task 4")
.AddBar(h1,"Task",#6/30/2005#,#7/2/2005#)
.CellValue(h1,1) = 1
End With
.EndUpdate()
End With
|
950
|
Can I control the units/resource/effort being allocated to a bar when displaying Overload histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Columns.Add("Effort")
.Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty) = 21
.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
End With
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 96
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 128
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
With .Bars.Item("Task")
.HistogramPattern = .Pattern
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverload
.HistogramCriticalValue = 3
.ShowHistogramValues = "value>3?255:1"
.HistogramItems = -11
.HistogramGridLinesColor = RGB(192,192,192)
.HistogramRulerLinesColor = RGB(0,0,1)
End With
End With
With .Items
.AllowCellValueToItemBar = True
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/21/2005#,#6/23/2005#)
.CellValue(h1,1) = 4
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/24/2005#,#6/26/2005#)
.CellValue(h1,1) = 3
h1 = .AddItem("Task 3")
.AddBar(h1,"Task",#6/27/2005#,#6/29/2005#)
.CellValue(h1,1) = 2
h1 = .AddItem("Task 4")
.AddBar(h1,"Task",#6/30/2005#,#7/2/2005#)
.CellValue(h1,1) = 1
End With
.EndUpdate()
End With
|
949
|
How can I display double-lines curves in the histogram

With AxG2antt1
.AntiAliasing = True
With .Chart
.PaneWidth(False) = 48
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramItems = 3
.HistogramBorderColor = RGB(128,0,0)
.HistogramColor = RGB(255,0,0)
End With
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#)
End With
End With
|
948
|
Is there any option to display values in the histogram using different colors

With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramItems = 6
.ShowHistogramValues = "value>1?255:65280"
End With
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#)
End With
End With
|
947
|
Is there any option to display values in the histogram using different colors

With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramItems = 6
.ShowHistogramValues = "value>1?255:1"
End With
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#)
End With
End With
|
946
|
How can I display only few values in the histogram, such as the values greater than a value

With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.ShowHistogramValues = "value>1"
End With
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#)
End With
End With
|
945
|
How can I display values in the histogram

With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.ShowHistogramValues = "1"
End With
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 1"),"Task",#1/3/2001#,#1/7/2001#)
End With
End With
|
944
|
How can I scroll the chart to find a bar
Dim h
With AxG2antt1
.Columns.Add("Column")
.Chart.LevelCount = 2
.Chart.PaneWidth(False) = 64
.DefaultItemHeight = 32
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,1)
.AddBar(.AddItem("Item 2"),"Task",#1/2/2001#,#1/4/2001#,2)
.AddBar(.AddItem("Item 3"),"Task",#1/2/2001#,#1/4/2001#,3)
.AddBar(.AddItem("Item 4"),"Task",#1/2/2001#,#1/4/2001#,4)
.AddBar(.AddItem("Item 5"),"Task",#1/2/2001#,#1/4/2001#,5)
.AddBar(.AddItem("Item 6"),"Task",#1/2/2001#,#1/4/2001#,6)
.AddBar(.AddItem("Item 7"),"Task",#1/2/2001#,#1/4/2001#,7)
.AddBar(.AddItem("Item 8"),"Task",#1/2/2001#,#1/4/2001#,8)
.AddBar(.AddItem("Item 9"),"Task",#1/2/2001#,#1/4/2001#,8)
.AddBar(.AddItem("Item 10"),"Task",#1/2/2001#,#1/4/2001#,10)
.AddBar(.AddItem("Item 11"),"Task",#1/2/2001#,#1/4/2001#,11)
.AddBar(.AddItem("Item 12"),"Task",#1/2/2001#,#1/4/2001#,12)
.AddBar(.AddItem("Item 13"),"Task",#1/2/2001#,#1/4/2001#,13)
.AddBar(.AddItem("Item 14"),"Task",#1/2/2001#,#1/4/2001#,14)
End With
h = .Items.FindBar(14)
.Items.EnsureVisibleItem(h)
.Chart.ScrollTo(AxG2antt1.Items.ItemBar(h,14,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart),1)
End With
|
943
|
Can I change the color/marker/frame for selected bars

Dim h
With AxG2antt1
.BeginUpdate()
With .VisualAppearance
.Add(2,"c:\exontrol\images\normal.ebn")
.Add(1,"CP:2 3 2 -3 -2")
End With
With .Chart
.FirstVisibleDate = #1/1/2002#
.SelBarColor = &H1000000
.PaneWidth(False) = 48
End With
.Columns.Add("Task")
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2002#,#1/4/2002#,"A")
.AddBar(h,"Task",#1/6/2002#,#1/10/2002#,"B")
.AddBar(h,"Task",#1/11/2002#,#1/14/2002#,"C")
.ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
.ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
End With
.EndUpdate()
End With
|
942
|
Can I display a larger marker for selected bars, eventually using the EBN technology

Dim h
With AxG2antt1
.BeginUpdate()
.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
With .Chart
.FirstVisibleDate = #1/1/2002#
.SelBarColor = &H1000000
.PaneWidth(False) = 48
End With
.Columns.Add("Task")
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2002#,#1/4/2002#,"A")
.AddBar(h,"Task",#1/6/2002#,#1/10/2002#,"B")
.AddBar(h,"Task",#1/11/2002#,#1/14/2002#,"C")
.ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
.ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
End With
.EndUpdate()
End With
|
941
|
How do I change the color for the selected bars

Dim h
With AxG2antt1
.BeginUpdate()
.Debug = True
With .Chart
.FirstVisibleDate = #1/1/2002#
.SelBarColor = RGB(255,0,0)
.PaneWidth(False) = 48
End With
.Columns.Add("Task")
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2002#,#1/4/2002#,"A")
.AddBar(h,"Task",#1/6/2002#,#1/10/2002#,"B")
.AddBar(h,"Task",#1/11/2002#,#1/14/2002#,"C")
.ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
.ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
End With
.EndUpdate()
End With
|
940
|
How can I change the background color for child bars of a summary bar

Dim h1,hR1
With AxG2antt1
.BeginUpdate()
.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
.HasLines = EXG2ANTTLib.HierarchyLineEnum.exNoLine
With .Chart
.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar
.AllowLinkBars = False
.FirstVisibleDate = #1/1/2008#
.LevelCount = 2
.PaneWidth(False) = 112
End With
.Columns.Add("")
With .Items
hR1 = .AddItem("Team 1")
.AddBar(hR1,"Summary",#1/2/2008#,#1/8/2008#,"")
.ItemBar(hR1,"",EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor) = 12895428
h1 = .InsertItem(hR1,Nothing,"Member 1")
.AddBar(h1,"Task",#1/2/2008#,#1/7/2008#)
.DefineSummaryBars(hR1,"",h1,"")
h1 = .InsertItem(hR1,Nothing,"Member 2")
.AddBar(h1,"Task",#1/4/2008#,#1/9/2008#)
.DefineSummaryBars(hR1,"",h1,"")
h1 = .InsertItem(hR1,Nothing,"Member 3")
.AddBar(h1,"Task",#1/5/2008#,#1/10/2008#)
.DefineSummaryBars(hR1,"",h1,"")
.ExpandItem(hR1) = True
End With
.EndUpdate()
End With
|
939
|
How can I allow resizing the bar only in the right part of the bar
Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize) = 2
End With
End With
|
938
|
How can I allow resizing the bar only in the left part of the bar
Dim h
With AxG2antt1
.Columns.Add("Task")
.Chart.FirstVisibleDate = #1/1/2001#
With .Items
h = .AddItem("Task 1")
.AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1")
.ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize) = 1
End With
End With
|
937
|
How can I show the links that starts from selected bar being more visible, while the rest being transparent

Dim h1,h2,h3
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.FirstVisibleDate = #9/20/2006#
.PaneWidth(False) = 64
.ShowLinksWidth(EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom) = 2
.ShowLinksStyle(EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom) = EXG2ANTTLib.LinkStyleEnum.exLinkDot
.ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo) = RGB(200,200,200)
.ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks) = RGB(200,200,200)
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#9/21/2006#,#9/23/2006#)
h2 = .AddItem("Task 2")
.AddBar(h2,"Task",#9/25/2006#,#9/27/2006#)
.ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
.AddLink("L1",h1,"",h2,"")
.Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText) = "L1"
h3 = .AddItem("Task 3")
.AddBar(h3,"Task",#9/29/2006#,#10/2/2006#)
.AddLink("L2",h2,"",h3,"")
.Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText) = "L2"
End With
.EndUpdate()
End With
|
936
|
How can I show only the links that starts from selected bar

Dim h,h1,h2,h3
With AxG2antt1
.BeginUpdate()
.MarkSearchColumn = False
.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exResizeChart
.Columns.Add("Tasks")
.Columns.Add("Start").Visible = False
.Columns.Add("End").Visible = False
With .Chart
.FirstVisibleDate = #9/20/2006#
.PaneWidth(False) = 64
.ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo) = .BackColor
.ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks) = .BackColor
End With
With .Items
h1 = .AddItem("Task 1")
.CellValue(h1,1) = #9/21/2006#
.CellValue(h1,2) = #9/24/2006#
.AddBar(h1,"Task",.CellValue(h1,1),.CellValue(h1,2))
h2 = .InsertItem(h,Nothing,"Task 2")
.CellValue(h2,1) = #9/25/2006#
.CellValue(h2,2) = #9/28/2006#
.AddBar(h2,"Task",.CellValue(h2,1),.CellValue(h2,2))
.ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
.AddLink("L1",h1,"",h2,"")
h3 = .InsertItem(h,Nothing,"Task 3")
.CellValue(h3,1) = #9/29/2006#
.CellValue(h3,2) = #10/2/2006#
.AddBar(h3,"Task",.CellValue(h3,1),.CellValue(h3,2))
.AddLink("L2",h2,"",h3,"")
End With
.EndUpdate()
End With
|
935
|
How can I hide links that are not related to selected bar

Dim h,h1,h2,h3
With AxG2antt1
.BeginUpdate()
.MarkSearchColumn = False
.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exResizeChart
.Columns.Add("Tasks")
.Columns.Add("Start").Visible = False
.Columns.Add("End").Visible = False
With .Chart
.FirstVisibleDate = #9/20/2006#
.PaneWidth(False) = 64
.ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks) = .BackColor
End With
With .Items
h1 = .AddItem("Task 1")
.CellValue(h1,1) = #9/21/2006#
.CellValue(h1,2) = #9/24/2006#
.AddBar(h1,"Task",.CellValue(h1,1),.CellValue(h1,2))
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected) = True
h2 = .InsertItem(h,Nothing,"Task 2")
.CellValue(h2,1) = #9/25/2006#
.CellValue(h2,2) = #9/28/2006#
.AddBar(h2,"Task",.CellValue(h2,1),.CellValue(h2,2))
.AddLink("L1",h1,"",h2,"")
h3 = .InsertItem(h,Nothing,"Task 3")
.CellValue(h3,1) = #9/29/2006#
.CellValue(h3,2) = #10/2/2006#
.AddBar(h3,"Task",.CellValue(h3,1),.CellValue(h3,2))
.AddLink("L2",h2,"",h3,"")
End With
.EndUpdate()
End With
|
934
|
How can I show the direction of the link using EBN files

Dim h1,h2
With AxG2antt1
.BeginUpdate()
With .VisualAppearance
.Add(1,"c:\exontrol\images\normal.ebn")
.Add(2,"CP:1 -1 -1 1 1")
.Add(3,"CP:1 -2 -2 2 2")
End With
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
End With
.Columns.Add("Column")
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"B1")
h2 = .AddItem("Task 2")
.AddBar(h2,"Task",#1/5/2001#,#1/13/2001#,"B2")
.AddLink("L1",h1,"B1",h2,"B2")
.Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor) = 16777216
h2 = .AddItem("Task 3")
.AddBar(h2,"Task",#1/5/2001#,#1/13/2001#,"B3")
.AddLink("L2",h1,"B1",h2,"B3")
.Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor) = 33554432
h2 = .AddItem("Task 4")
.AddBar(h2,"Task",#1/5/2001#,#1/13/2001#,"B5")
.AddLink("L3",h1,"B1",h2,"B5")
.Link("L3",EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor) = 50331648
End With
.EndUpdate()
End With
|
933
|
How can I show round links

With AxG2antt1
.Chart.FirstVisibleDate = #1/1/2001#
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1")
.AddBar(.AddItem("Item 2"),"Task",#1/5/2001#,#1/13/2001#,"B2")
.AddLink("L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2")
.Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound) = True
End With
End With
|
932
|
How can I change the color to display the arrow of the link

With AxG2antt1
.Chart.FirstVisibleDate = #1/1/2001#
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#,"B1")
.AddBar(.AddItem("Item 2"),"Task",#1/6/2001#,#1/14/2001#,"B2")
.AddLink("L1",.FindItem("Item 1",0),"B1",.FindItem("Item 2",0),"B2")
.Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor) = 255
End With
End With
|
931
|
I use UnitScale: exHour and I want to show only from 9 to 18 hour. The idea is to show only the working part of a day. Is this possible

With AxG2antt1
.BeginUpdate()
With .Chart
.MarkTodayColor = .BackColor
.BackColorLevelHeader = RGB(255,255,255)
.PaneWidth(False) = 0
.LevelCount = 2
With .Level(0)
.Label = "<b><%dddd%></b> <%d%>"
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
End With
With .Level(1)
.Label = 65536
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine Or EXG2ANTTLib.LevelLineEnum.exLevelDotLine
.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelDotLine)
End With
.NonworkingHours = 16253439
.ShowNonworkingUnits = False
.ShowNonworkingDates = False
.ShowNonworkingHours = False
End With
.EndUpdate()
End With
|
930
|
Can I display tick lines from other level to my base level so time units gets separated more clearly

With AxG2antt1
.BeginUpdate()
With .Chart
.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
.UnitWidth = 24
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 0
.LevelCount = 2
With .Level(0)
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.Label = "<%dddd%>"
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
With .Level(1)
.Label = 65536
.Count = 6
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine)
End With
End With
.EndUpdate()
End With
|
929
|
Is there any property to change the style of the tick lines being shown in the chart

With AxG2antt1
.BeginUpdate()
With .Chart
.UnitWidth = 24
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 0
.LevelCount = 2
With .Level(0)
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.Label = "<%dddd%>"
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
With .Level(1)
.Label = 65536
.Count = 6
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelUpperHalf Or EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
.EndUpdate()
End With
|
928
|
Is there any property to change the style of the tick lines being shown in the chart

With AxG2antt1
.BeginUpdate()
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 0
.LevelCount = 2
.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
With .Level(0)
.Label = "<%dddd%>"
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
With .Level(1)
.Label = 65536
.Count = 6
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine
End With
End With
.EndUpdate()
End With
|
927
|
How can I show the levels based on the base level so tick lines aligns better

With AxG2antt1
.BeginUpdate()
With .Chart
.AdjustLevelsToBase = True
.UnitWidth = 24
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 0
.LevelCount = 2
.Level(0).Label = "<%dddd%>"
With .Level(1)
.Label = 65536
.Count = 5
End With
End With
.EndUpdate()
End With
|
926
|
How can I show only working hours in other words only the working part of the day

With AxG2antt1
.BeginUpdate()
With .Chart
.AllowSelectDate = EXG2ANTTLib.SelectDateEnum.exNoSelectDate
.MarkTodayColor = .BackColor
.PaneWidth(False) = 0
.LevelCount = 2
With .Level(0)
.Label = "<b><%dddd%></b> <%d%>"
.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment
.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
End With
With .Level(1)
.Label = 65536
.ReplaceLabel("09") = "<fgcolor=FF0000><b><font ;10>9</font></b></fgcolor>"
End With
.NonworkingHours = 16253439
.ShowNonworkingUnits = False
.ShowNonworkingDates = False
.ShowNonworkingHours = False
End With
.EndUpdate()
End With
|
925
|
How can I specify the effort for bars when displaying the overload histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 52
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 64
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
With .Bars.Item("Task")
.HistogramPattern = .Pattern
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverload
.HistogramItems = -6
.HistogramGridLinesColor = RGB(192,192,192)
.HistogramRulerLinesColor = RGB(0,0,1)
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/21/2005#,#6/23/2005#,"","4")
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/24/2005#,#6/26/2005#,"",3)
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 3
h1 = .AddItem("Task 3")
.AddBar(h1,"Task",#6/27/2005#,#6/29/2005#,"",2)
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 2
h1 = .AddItem("Task 4")
.AddBar(h1,"Task",#6/30/2005#,#7/2/2005#,"",1)
End With
.EndUpdate()
End With
|
924
|
How can I display the cumulative histogram and showing the bars that generated it using different colors

Dim h
With AxG2antt1
.BeginUpdate()
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 128
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternSolid
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative
.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor
.HistogramItems = 6
.HistogramRulerLinesColor = RGB(128,0,0)
.HistogramBorderColor = RGB(1,0,0)
End With
End With
With .Columns.Add("Column")
.Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox) = True
.PartialCheck = True
End With
With .Items
h = .AddItem("Project 1")
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 3"),"Task",#1/4/2001#,#1/6/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 4"),"Task",#1/2/2001#,#1/8/2001#)
.CellState(.ItemByIndex(1),0) = 1
.ExpandItem(h) = True
End With
.EndUpdate()
End With
|
923
|
How can I show the cumulative histogram for my bar

Dim h
With AxG2antt1
.BeginUpdate()
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 128
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternSolid
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative
.HistogramItems = 6
.HistogramRulerLinesColor = RGB(128,0,0)
.HistogramBorderColor = RGB(1,0,0)
End With
End With
With .Columns.Add("Column")
.Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox) = True
.PartialCheck = True
End With
With .Items
h = .AddItem("Project 1")
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 3"),"Task",#1/4/2001#,#1/6/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 4"),"Task",#1/2/2001#,#1/8/2001#)
.CellState(.ItemByIndex(1),0) = 1
.ExpandItem(h) = True
End With
.EndUpdate()
End With
|
922
|
How can I show some grid lines or ruler in the histogram

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 78
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramItems = 6
.HistogramRulerLinesColor = RGB(128,0,0)
.HistogramGridLinesColor = RGB(255,0,0)
End With
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project 1")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
End With
End With
|
921
|
Is there any property to show some grid lines in the histogram

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 78
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramItems = 6
.HistogramGridLinesColor = RGB(255,0,0)
End With
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project 1")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
End With
End With
|
920
|
How can I specify a fixed number of bars/items being shown in the histogram

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 78
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramCriticalValue = 3
.HistogramItems = -6
.HistogramRulerLinesColor = RGB(1,0,0)
End With
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project 1")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
h = .AddItem("Project 2")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/4/2001#,#1/7/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/6/2001#,#1/8/2001#)
.ExpandItem(h) = True
h = .AddItem("Project 3")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
h = .AddItem("Project 4")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/4/2001#,#1/7/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/6/2001#,#1/8/2001#)
.ExpandItem(h) = True
End With
End With
|
919
|
Is there any option to specify a minimum number of bars/items displayed in the histogram

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 64
.PaneWidth(False) = 78
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Item("Task")
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
.HistogramItems = 6
.HistogramGridLinesColor = RGB(1,0,0)
.HistogramRulerLinesColor = RGB(1,0,0)
End With
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project 1")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
h = .AddItem("Project 2")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/4/2001#,#1/7/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/6/2001#,#1/8/2001#)
.ExpandItem(h) = True
End With
End With
|
918
|
How can I show the histogram without grouping the bars based on their parents

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project 1")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
h = .AddItem("Project 2")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/4/2001#,#1/7/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/6/2001#,#1/8/2001#)
.ExpandItem(h) = True
End With
End With
|
917
|
How can I show the histogram for checked item and all recursively child items

Dim h
With AxG2antt1
.BeginUpdate()
With .Chart
.PaneWidth(False) = 128
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 128
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramRecLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project")
.CellHasCheckBox(h,0) = True
.CellState(h,0) = 1
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#)
.ExpandItem(h) = True
h = .InsertItem(h,Nothing,"SubProject")
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/3/2001#,#1/7/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/5/2001#,#1/8/2001#)
.ExpandItem(h) = True
End With
.EndUpdate()
End With
|
916
|
How can I show the histogram for checked item and its child items

Dim h
With AxG2antt1
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
h = .AddItem("Project")
.CellHasCheckBox(h,0) = True
.AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/7/2001#)
.ExpandItem(h) = True
End With
End With
|
915
|
How can I show the histogram for all items

With AxG2antt1
.BeginUpdate()
.SingleSel = False
With .Chart
.FirstVisibleDate = #1/1/2001#
.LevelCount = 2
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#)
End With
.EndUpdate()
End With
|
914
|
How can I prevent selecting a new item when clicking the chart area so my selection is shown in the histogram

With AxG2antt1
.SingleSel = False
With .Chart
.SelectOnClick = False
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#)
.SelectItem(.ItemByIndex(0)) = True
End With
End With
|
913
|
How can I show bars in the histogram for selected items only

With AxG2antt1
.SingleSel = False
With .Chart
.FirstVisibleDate = #1/1/2001#
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal
End With
.Columns.Add("Column")
With .Items
.AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#)
.AddBar(.AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#)
.SelectItem(.ItemByIndex(0)) = True
End With
End With
|
912
|
How can I change the color and size for the curve in the histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 64
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 68
With .Bars.Item("Task")
.HistogramPattern = &H100 Or EXG2ANTTLib.PatternEnum.exPatternDot
.HistogramBorderColor = RGB(0,255,0)
.HistogramBorderSize = 5
End With
End With
With .Items
h1 = .AddItem("Task")
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1,1)
.AddBar(h1,"Task",#6/23/2005#,#6/28/2005#,2,2)
End With
.EndUpdate()
End With
|
911
|
How can I change the color for the frame in the histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 64
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 68
With .Bars.Item("Task")
.HistogramPattern = &H100 Or EXG2ANTTLib.PatternEnum.exPatternShadow
.HistogramItems = 5
.HistogramBorderColor = RGB(255,0,0)
End With
End With
With .Items
h1 = .AddItem("Task")
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1,1)
.AddBar(h1,"Task",#6/23/2005#,#6/28/2005#,2,2)
End With
.EndUpdate()
End With
|
910
|
How can I force the histogram for a bar being shown all the time

Dim h1
With AxG2antt1
.BeginUpdate()
.ScrollBySingleLine = True
.Columns.Add("Tasks").Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox) = True
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 64
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 68
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems
With .Bars.Copy("Task","H")
.Color = RGB(0,255,0)
.HistogramPattern = &H100
.HistogramItems = 5
.HistogramColor = .Color
.HistogramGridLinesColor = RGB(128,128,128)
.HistogramRulerLinesColor = RGB(0,0,1)
End With
With .Bars.Item("Task")
.HistogramCriticalColor = RGB(0,0,128)
.HistogramPattern = .Pattern
.HistogramItems = 5
.HistogramGridLinesColor = RGB(128,128,128)
.HistogramRulerLinesColor = RGB(0,0,1)
End With
End With
With .Items
h1 = .AddItem("Hidden")
.AddBar(h1,"H",#6/23/2005#,#6/28/2005#,1)
.AddBar(h1,"H",#6/24/2005#,#6/26/2005#,2)
.CellState(h1,0) = 1
.ItemHeight(h1) = 0
.SelectableItem(h1) = False
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1)
.CellState(h1,0) = 1
h1 = .AddItem("Task 2")
.CellState(h1,0) = 1
.AddBar(h1,"Task",#6/24/2005#,#7/1/2005#,1)
End With
.EndUpdate()
End With
|
909
|
How can I remove a bar type from the histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 40
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 32
With .Bars.Item("Task")
.HistogramCriticalColor = RGB(0,0,128)
.HistogramPattern = .Pattern
End With
With .Bars.Copy("Task","Green")
.Color = RGB(0,255,0)
.HistogramPattern = .Pattern
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Green",#6/22/2005#,#6/26/2005#,0)
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1)
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = 3
h1 = .AddItem("Task 2")
.AddBar(h1,"Green",#6/28/2005#,#6/30/2005#,0)
.AddBar(h1,"Task",#6/27/2005#,#7/1/2005#,1)
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset) = 3
End With
With .Chart.Bars.Item("Green")
.HistogramColor = .Color
.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternEmpty
End With
.EndUpdate()
End With
|
908
|
How can I show the two buttons in the vertical splitter but still resizes the chart when the control gets resized

With AxG2antt1
.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exSplitterShowButtons Or EXG2ANTTLib.OnResizeControlEnum.exResizeChart
.Chart.PaneWidth(False) = 96
.Chart.LevelCount = 2
End With
|
907
|
I have seen a screen shot on your web page that shows two buttons on the vertical scroll bar. How can I show them
With AxG2antt1
.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exSplitterShowButtons
.Chart.PaneWidth(False) = 96
End With
|
906
|
How can I disable selecting a new item once the user clicks the chart area

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
.SingleSel = False
With .Chart
.SelectOnClick = False
.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
.LevelCount = 2
.PaneWidth(False) = 40
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 32
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems
.Bars.Item("Task").HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternSolid
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/22/2005#,#6/26/2005#,0)
.SelectItem(h1) = True
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/24/2005#,#6/30/2005#,0)
.SelectItem(h1) = True
End With
.EndUpdate()
End With
|
905
|
Is there any option to display the chart's header in the bottom side of the histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 40
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
.HistogramHeight = 96
.HistogramHeaderVisible = True
With .Bars.Item("Task")
.Color = RGB(0,0,255)
.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset
.OverlaidGroup = "Task2"
.HistogramCriticalColor = RGB(0,0,128)
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
With .Bars.Copy("Task","Task2")
.Color = RGB(0,255,0)
.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset
.OverlaidGroup = "Task"
.HistogramCriticalColor = RGB(0,128,0)
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task2",#6/22/2005#,#6/26/2005#,0)
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1)
.ItemBar(h1,0,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 3
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
h1 = .AddItem("Task 2")
.AddBar(h1,"Task2",#6/28/2005#,#6/30/2005#,0)
.AddBar(h1,"Task",#6/27/2005#,#7/1/2005#,1)
.ItemBar(h1,0,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 1
End With
.EndUpdate()
End With
|
904
|
How can I display the child bars as soon as an item gets collapsed

Dim h,h1,h2,h3
With AxG2antt1
.BeginUpdate()
.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
.Columns.Add("Tasks")
With .Chart
.FirstVisibleDate = #9/20/2006#
.ShowCollapsedBars = True
.LevelCount = 2
.PaneWidth(False) = 96
End With
With .Items
h = .AddItem("Project 1")
h1 = .InsertItem(h,Nothing,"Task 1")
.AddBar(h1,"Task",#9/21/2006#,#9/23/2006#,"A")
h2 = .InsertItem(h,Nothing,"Task 2")
.AddBar(h2,"Task",#9/24/2006#,#9/26/2006#,"B")
h3 = .InsertItem(h,Nothing,"Task 3")
.AddBar(h3,"Task",#9/27/2006#,#9/29/2006#,"C")
h = .AddItem("Project 2")
h1 = .InsertItem(h,Nothing,"Task 1")
.AddBar(h1,"Task",#9/21/2006#,#9/23/2006#,"A")
h2 = .InsertItem(h,Nothing,"Task 2")
.AddBar(h2,"Task",#9/24/2006#,#9/26/2006#,"B")
h3 = .InsertItem(h,Nothing,"Task 3")
.AddBar(h3,"Task",#9/27/2006#,#9/29/2006#,"C")
.ExpandItem(h) = True
End With
.EndUpdate()
End With
|
903
|
What exBarEffort property represents

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.PaneWidth(False) = 40
.FirstVisibleDate = #6/9/2005#
.HistogramVisible = True
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
.HistogramHeight = 164
With .Bars.Item("Task")
.HistogramPattern = &H100
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/10/2005#,#6/11/2005#,Nothing,"1/1=<b>100%")
.ItemBar(h1,Nothing,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/12/2005#,#6/14/2005#,Nothing,"1/2=<b>50%")
.ItemBar(h1,Nothing,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
h1 = .AddItem("Task 3")
.AddBar(h1,"Task",#6/15/2005#,#6/18/2005#,Nothing,"1/3=<b>33%")
.ItemBar(h1,Nothing,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
h1 = .AddItem("Task 4")
.AddBar(h1,"Task",#6/19/2005#,#6/23/2005#,Nothing,"1/4=<b>25%")
.ItemBar(h1,Nothing,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
h1 = .AddItem("Task 5")
.AddBar(h1,"Task",#6/24/2005#,#6/29/2005#,Nothing,"1/5=<b>20%")
.ItemBar(h1,Nothing,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
End With
.EndUpdate()
End With
|
902
|
Can I display multiple curves in the histogram

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 40
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
.HistogramHeight = 64
With .Bars.Item("Task")
.Color = RGB(0,0,255)
.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset
.OverlaidGroup = "Task2"
.HistogramCriticalColor = RGB(0,0,128)
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
With .Bars.Copy("Task","Task2")
.Color = RGB(0,255,0)
.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset
.OverlaidGroup = "Task"
.HistogramCriticalColor = RGB(0,128,0)
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task2",#6/22/2005#,#6/26/2005#,0)
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#,1)
.ItemBar(h1,0,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 3
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
h1 = .AddItem("Task 2")
.AddBar(h1,"Task2",#6/28/2005#,#6/30/2005#,0)
.AddBar(h1,"Task",#6/27/2005#,#7/1/2005#,1)
.ItemBar(h1,0,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
.ItemBar(h1,1,EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 1
End With
.EndUpdate()
End With
|
901
|
How can I use the exBarEffort property

Dim h1
With AxG2antt1
.BeginUpdate()
.Columns.Add("Tasks")
With .Chart
.LevelCount = 2
.NonworkingDays = 0
.PaneWidth(False) = 40
.FirstVisibleDate = #6/20/2005#
.HistogramVisible = True
.HistogramHeight = 64
.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems
With .Bars.Item("Task")
.HistogramCriticalColor = RGB(255,0,0)
.HistogramPattern = EXG2ANTTLib.PatternEnum.exBezierCurve
.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation
End With
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar(h1,"Task",#6/21/2005#,#6/25/2005#)
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 4
h1 = .AddItem("Task 2")
.AddBar(h1,"Task",#6/27/2005#,#7/1/2005#)
.ItemBar(h1,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort) = 1
End With
.EndUpdate()
End With
|